package com.teradata.olingo.processor.core.database;

import com.sap.olingo.jpa.processor.core.filter.*;
import com.teradata.olingo.processor.core.filter.*;
import org.apache.olingo.server.api.ODataApplicationException;

import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.Expression;

public interface GenericODataDatabaseOperations {

  public void setCriterialBuilder(final CriteriaBuilder cb);

  public <T extends Number> Expression<T> convert(final GenericArithmeticOperator jpaOperator)
      throws ODataApplicationException;

  public Expression<Boolean> convert(final GenericBooleanOperator jpaOperator) throws ODataApplicationException;

  public Expression<Boolean> convert(final GenericComparisonOperatorImp jpaOperator) throws ODataApplicationException;

  public <T> Expression<T> convert(final GenericMethodCall jpaFunction) throws ODataApplicationException;

  public Expression<Boolean> convert(final GenericUnaryBooleanOperator jpaOperator) throws ODataApplicationException;

  public Expression<Long> convert(final GenericAggregationOperation jpaOperator) throws ODataApplicationException;
}
